package com.pingan.pastry.common.config;

/*import com.pingan.pastry.common.proxy.RemoteProxy;
import com.pingan.pastry.proxy.handler.RemoteInvoker;*/
import com.pingan.pastry.spi.UserSPI;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/*@Component
public class RemoteManager {

    @Bean
    public RemoteProxy remoteProxy() {
        Class targetInterface = UserSPI.class;
        RemoteInvoker invoker = new RemoteInvoker("local", "get");
        RemoteProxy proxy = new RemoteProxy();
        proxy.setTargetInterface(targetInterface);
        proxy.setInvocationHandler(invoker);
        return proxy;
    }

    public static void main(String[] args) throws NoSuchMethodException {

        Method[] methods = UserSPI.class.getMethods();
        //Method toString = stu.getClass().getMethod("toString", null);

        for (Method method : methods) {
            System.out.println("method:"+method.getName()+" isObjDefaultMethod: "+((method.getModifiers() & 1033) == 1));
        }
    }

}*/
